<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>管理员列表</title>
  <link rel="stylesheet" th:href="@{../static/css/component.css}">
  <link rel="stylesheet" th:href="@{../static/css/admin.css}">
  <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">

  <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
  <script th:src="@{../static/js/common.js}"></script>
  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
<div class="rbody" id="app">
  <div class="top">
    当前位置：后台<i class="fa fa-fw fa-angle-right"></i>管理员列表
  </div>
  <div class="main">
    <div class="tabList">
      <span class="active">管理员列表</span>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading">
      用户查询
    </div>
    <div class="panel-body">
    <form id="peopleForm"  th:action="@{../user/queryadmins}" method="post">
      输入账号
      <input type="text"  name="number" th:value="${number}">
      用户名
      <input type="text"  name="username" th:value="${username}">
      角色
      <input type="text"  name="role" th:value="${role}">
      <button type="submit" class="btn btn-default"  >查询</button>
    </form>
    </div>
    </div>
    <div class="tableLists mrb10">
      <form th:action="@{/user/deleteadmin}" method="post">
        <table>
          <tr>
            <th>用户ID</th>
            <th>用户名</th>
            <th>账号</th>
            <th>学号</th>
            <th>学院</th>
            <th>性别</th>
            <th>身份</th>
            <th>角色</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          <tr th:each="user:${page.records}">
            <td><input  name="userId" th:value="${user.userId}" readonly="readonly" style="border: none ; outline: none"/></td>
            <td th:text="${user.getUserName()}"></td>
            <td th:text="${user.aNumber}"></td>
            <td th:text="${user.number}"></td>
            <td th:text="${user.academy}"></td>
            <td th:text="${user.sex}"></td>
            <td th:text="${user.identity}"></td>
            <td th:text="${user.role}"></td>
            <td th:text="${user.state}"></td>
            <td>
              <button type="submit" class="btn btn-default">删除</button>
              <a class="btn btn-default"  th:href="@{totransfer(userID=${user.userId})}" style="font-size: 13px">转让权限</a>
            </td>
          </tr>
        </table>

        <ul class="pagination">
            <li><a th:href="@{../user/queryadmins(pageNum=1,number=${number},username=${username},role=${role})}">首页</a></li>
            <li><a th:if="${page.current}!=1"
               th:href="@{../user/../user/queryadmins(pageNum=${page.current}-1,number=${number},username=${username},role=${role})}">上一页</a></li>
            <li><a th:if="${page.current}!=${page.pages}"
               th:href="@{../user/queryadmins(pageNum=${page.current}+1,number=${number},role=${role},role=${role})}">下一页</a></li>
            <li><a th:href="@{../user/queryadmins(pageNum=${page.pages},number=${number},username=${username},role=${role})}">尾页</a></li>
        </ul>
      </form>
    </div>
  </div>
</div>
</div>

</body>

</html>